import request from 'admin/api/request'

export function getStudentList(data) {
    return request({
        apiName: "请求学生列表",
        url: `${request.httpUrl["user-api"]}/edu/student/page`,
        method: 'get',
        data
    })
}

export function importStudentInfo(data) {
    return request({
        apiName: "录入学生",
        url: `${request.httpUrl["user-api"]}/edu/student/import_student_info`,
        method: 'post',
        data
    })
}

export function authorizationStudent(data) {
    return request({
        apiName: "海康学生授权",
        url: `${request.httpUrl["yyc"]}/stucampusrecord/saveByExcel`,
        method: 'post',
        data
    })
}

export function putAccessMessageAuthorize(data) {
    return request({
        apiName: "学生消息授权",
        url: '/student/access_message_authorize',
        method: 'put',
        data
    })
}

export function getStudentParentList(data) {
    return request({
        apiName: "家长列表",
        url: `${request.httpUrl["user-api"]}/edu/student/student_parent_list`,
        method: 'get',
        data
    })
}

export function getParentList(params) {
    return request({
        apiName: "学生家长列表",
        url: '/student/parent_list',
        method: 'post',
        params
    })
}

export function dataSynchronize(params) {
    return request({
        apiName: "学生信息恢复",
        url: `${request.httpUrl["user-api"]}/edu/student/recover`,
        method: 'get',
        params
    })
}

export function updateDataSynchronize(data) {
    return request({
        apiName: "同步数据",
        url: `${request.httpUrl["user-api"]}/edu/student/data_synchronize`,
        method: 'get',
        data
    })
}

export function updateLevelNick(data) {
    return request({
        apiName: "更新班级名称",
        url: `${request.httpUrl["user-api"]}/edu/level/update_nick`,
        method: 'put',
        data
    })
}

export function removeStudentInfo(params) {
    return request({
        apiName: "删除学生信息",
        url: `${request.httpUrl["user-api"]}/edu/student/remove`,
        method: 'delete',
        params
    })
}

export function updateStudentNo(data) {
    return request({
        apiName: "更新学号",
        url: `${request.httpUrl["user-api"]}/edu/student/update_student_info`,
        method: 'put',
        data
    })
}

export function qyDataSync(params) {
    return request({
        apiName: "同步企业微信学生家长信息",
        url: '/student/sync',
        method: 'post',
        params
    })
}

export function studentInfoSync(data) {
    return request({
        apiName: "学生信息同步",
        url: `${request.httpUrl["user-api"]}/edu/student/sync`,
        method: 'get',
        data
    })
}

export function getWxCpInfo(data) {
    return request({
        apiName: "企业微信学生数据",
        url: '/student/we_chat_cp_info',
        method: 'get',
        data
    })
}
